<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Conf\ConfModel;

use Srv\Libs\ConfModel\ConfAbstract;

final class SignInConf extends ConfAbstract
{
    public const PREFIX                         = 'SIGNIN.';            // 配置前缀[必定点结尾]
    private string $groupName                   = '';                   // 分组名
    protected string $qqAppId                   = '';                   // QQ互联第三方登录appId
    protected string $qqAppKey                  = '';                   // QQ互联第三方登录appKey
    protected bool $qqAIsUnionId                = false;                // QQ互联第三方登录是否匹配unionId
    protected string $weChatAppId               = '';                   // 微信开放平台appId
    protected string $weChatAppSecret           = '';                   // 微信开放平台appSecret
    protected string $weiboAppId                = '';                   // 微博开放平台appId
    protected array $appleBundleIds             = [];                   // 允许登入的Apple应用BundleId[APP]
    protected string $appleClientId             = '';                   // Apple-clientId WebSite的Id
    protected string $appleClientIdAlias        = '';                   // Apple-clientIdAlias 配置别名为APP包名时,可与APP的账号保持一致[可空]
    protected string $appleAuthIss              = '';                   // Apple-teamId 团队Id
    protected string $appleAuthKeyId            = '';                   // Apple-kId AuthKey文件的KId
    protected string $appleAuthKeyFile          = '';                   // Apple-AuthKeyFile AuthKey文件[.p8]
    protected string $facebookAppId             = '';                   // Facebook开放平台appId
    protected string $facebookAppSecret         = '';                   // Facebook开放平台appSecret
    protected array $googleProjectNums          = [];                   // 允许登入的Google项目编号[APP]
    protected string $googleClientId            = '';                   // Google开放平台clientId
    protected string $googleClientSecret        = '';                   // Google开放平台clientSecret
    protected string $tiktokAppId               = '';                   // TikTok开放平台appId
    protected string $tiktokClientKey           = '';                   // TikTok开放平台clientKey
    protected string $tiktokClientSecret        = '';                   // TikTok开放平台clientSecret

    /**
     * @param array $confData
     * @param string $groupName
     */
    public function __construct(array $confData, string $groupName)
    {
        $this->init($confData);
        $this->groupName = $groupName;
    }

    /**
     * @return string
     */
    public function getGroupName(): string
    {
        return $this->groupName;
    }

    /**
     * @return string
     */
    public function getQqAppId(): string
    {
        return $this->qqAppId;
    }

    /**
     * @return string
     */
    public function getQqAppKey(): string
    {
        return $this->qqAppKey;
    }

    /**
     * @return bool
     */
    public function isQqAIsUnionId(): bool
    {
        return $this->qqAIsUnionId;
    }

    /**
     * @return string
     */
    public function getWeChatAppId(): string
    {
        return $this->weChatAppId;
    }

    /**
     * @return string
     */
    public function getWeChatAppSecret(): string
    {
        return $this->weChatAppSecret;
    }

    /**
     * @return string
     */
    public function getWeiboAppId(): string
    {
        return $this->weiboAppId;
    }

    /**
     * @return array
     */
    public function getAppleBundleIds(): array
    {
        return $this->appleBundleIds;
    }

    /**
     * @return string
     */
    public function getAppleClientId(): string
    {
        return $this->appleClientId;
    }

    /**
     * @return string
     */
    public function getAppleClientIdAlias(): string
    {
        return $this->appleClientIdAlias;
    }

    /**
     * @return string
     */
    public function getAppleAuthIss(): string
    {
        return $this->appleAuthIss;
    }

    /**
     * @return string
     */
    public function getAppleAuthKeyId(): string
    {
        return $this->appleAuthKeyId;
    }

    /**
     * @return string
     */
    public function getAppleAuthKeyFile(): string
    {
        return $this->appleAuthKeyFile;
    }

    /**
     * @return string
     */
    public function getFacebookAppId(): string
    {
        return $this->facebookAppId;
    }

    /**
     * @return string
     */
    public function getFacebookAppSecret(): string
    {
        return $this->facebookAppSecret;
    }

    /**
     * @return array
     */
    public function getGoogleProjectNums(): array
    {
        return $this->googleProjectNums;
    }

    /**
     * @return string
     */
    public function getGoogleClientId(): string
    {
        return $this->googleClientId;
    }

    /**
     * @return string
     */
    public function getGoogleClientSecret(): string
    {
        return $this->googleClientSecret;
    }

    /**
     * @return string
     */
    public function getTiktokAppId(): string
    {
        return $this->tiktokAppId;
    }

    /**
     * @return string
     */
    public function getTiktokClientKey(): string
    {
        return $this->tiktokClientKey;
    }

    /**
     * @return string
     */
    public function getTiktokClientSecret(): string
    {
        return $this->tiktokClientSecret;
    }
}